1. Field of the Invention
The present invention relates to a watchdog timer and a control method therefor, and more particularly, to a technology of setting an overflow time to a watchdog timer used for a microcontroller.
2. Description of Related Art
In a microcontroller (microcomputer) or the like, a watchdog timer is generally used in order to detect runaway upon execution of the program (the program becomes trapped in loops with no controlled exit). With regard to such a watchdog timer as described above, JP 2003-67221 A describes a control circuit for a watchdog timer that is capable of reliably detecting runaway occurring in a microcontroller even in a case where there exist a plurality of events having different optimal timer initialization permission periods set therefor. With such a control circuit as described above, even in a case where the microcontroller executes a plurality of events having different lengths of processing time set therefor, runaway occurring in the microcontroller may be reliably detected by selecting an optimal initialization permission period of the watchdog timer depending on the event executed by the microcontroller, to thereby improve the reliability of the microcontroller. In such a watchdog timer as described above, the overflow time is set to have a constant value, such as a value falling within a range of from several tens of milliseconds to several hundreds of milliseconds in general.